ruby:
  demo_mode = default_admin_in_demo_mode?(@user)
  update_url = demo_mode ? root_path : (@user.new_record? ? admin_users_path : admin_user_path(@user))

= simple_form_for(@user, url: update_url) do |f|
  .card-body
    = f.error_notification

    = f.input :username, required: true
    = f.input :email, required: true
    = f.input :password
    = f.input :role, collection: preset_roles, include_blank: false

  .card-footer
    - if demo_mode
      = f.button :button, t('errors.messages.invaild_in_demo_mode'), disabled: true
    - else
      = f.button :submit